@(title: String, nav1: String = "community", nav2: String = "", keywords: String = "", description: String = "")(content: Html)(implicit request: RequestHeader)

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>@{title}</title>
    <meta property="og:site_name" content="@app.Global.siteSetting.name"/>
    <meta property="og:description" content="@app.Global.siteSetting.seoDescription"/>
    <meta property="og:type" content="website">
    <meta property="og:title" content="@app.Global.siteSetting.name">
    <meta property="og:url" content="https://www.playscala.cn">
    <meta property="og:locale" content="zh-CN">
    <meta name="description" content="@{description} | @{app.Global.siteSetting.seoDescription}">
    <meta name="keywords" content="@{keywords} | @{app.Global.siteSetting.seoKeyword}">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/assets/fly3/res/layui/css/layui.css">
    <link rel="stylesheet" href="/assets/fly3/res/css/global.css">
</head>
<script src="/assets/js/jquery.js"></script>
<script src="/assets/fly3/res/layui/layui.js"></script>
<script src="/assets/js/vue.js"></script>
<script src="/assets/js/copyright.js"></script>
<script src="/assets/js/main.js"></script>
<body>

<div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="/">
            <!--<img src="@app.Global.siteSetting.logo" alt="PlayScala社区">-->
            <img src="/assets/images/logo.png" alt="PlayScala社区">
        </a>
        <ul class="layui-nav fly-nav layui-hide-xs" style="padding-left: 30px;">
            <li class='layui-nav-item @if(nav1 == "community"){layui-this}'>
                <a href="/"><i class="iconfont icon-jiaoliu"></i>首页</a>
            </li>
            <li class='layui-nav-item @if(nav1 == "board"){layui-this}'>
                <a href="/board/all"><i class="iconfont icon-jiaoliu"></i>版块</a>
            </li>
            <li class='layui-nav-item @if(nav1 == "learn"){layui-this}'>
                <a href="/docs"><i class="iconfont icon-iconmingxinganli"></i>学习</a>
            </li>
            <li class='layui-nav-item @if(nav1 == "dict"){layui-this}'>
                <a href="/dict"><i class="layui-icon layui-icon-read"></i>词典</a>
            </li>
            <li class='layui-nav-item'>
                <a href="/corporations"><i class="iconfont icon-logo"></i>圈子</a>
            </li>
            <li class='layui-nav-item @if(nav1 == "tweet"){layui-this}'>
                <a href="/tweets"><i class="iconfont icon-logo"></i>说说</a>
            </li>
            <li class='layui-nav-item'>
                <a href="https://github.com/playcommunity/play-community" target="_blank"><i class="iconfont icon-daima"></i>源码</a>
            </li>
        </ul>

        <ul class="layui-nav fly-nav-user">

            @if(!utils.RequestHelper.isLogin){
            <!-- 未登入的状态 -->
            <li class="layui-nav-item">
                <a class="iconfont icon-touxiang layui-hide-xs" href="/login"></a>
            </li>
            <li class="layui-nav-item">
                <a href="/login">登入</a>
            </li>
            <li class="layui-nav-item">
                <a href="/register">注册</a>
            </li>
            }else{
            <li class="layui-nav-item">
                <a class="fly-nav-avatar" href="javascript:;">
                    <cite class="layui-hide-xs">@request.session("name")</cite>
                    <!--<i class="iconfont icon-renzheng layui-hide-xs" title=""></i>
                    <i class="layui-badge fly-badge-vip layui-hide-xs">VIP3</i>-->
                    <img src="@request.session("headImg")">
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="/user/setting"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
                    <dd><a href="/user/message"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
                    <dd><a href="/user/home"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
                    <hr style="margin: 5px 0;">
                    <dd><a href="/logout" style="text-align: center;">退出</a></dd>
                </dl>
            </li>
            }
        </ul>
    </div>
</div>

@content

<div class="fly-footer">
    <p>
        <span id="footer-copyright">2018</span> &copy; <a href="http://www.playscala.cn/" target="_blank">PlayScala 社区</a>
        <a href="http://www.miitbeian.gov.cn" target="_blank">苏ICP备14005538号-1</a>
    </p>
    @*
    <p>
        <a href="https://github.com/playcommunity/play-community" target="_blank">社区源码</a>
        <a href="" target="_blank">微信公众号</a>
    </p>
    *@
</div>
<script>
layui.cache.page = '';
layui.cache.user = {
  username: '游客'
  ,uid: '@request.session.get("uid").getOrElse("-1")'
  ,avatar: '/assets/fly3/res/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "3.0.0"
  ,base: '/assets/fly3/res/mods/' //这里实际使用时，建议改成绝对路径
}).extend({
  fly: 'index'
}).use('fly');
</script>

<!-- 百度自动推送索引链接代码 -->
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
</body>
</html>